home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
JCSM Shareware Collection 1993 November
/
JCSM Shareware Collection - 1993-11.iso
/
cl720
/
sst115j.lzh
/
MSCDEMO.C
< prev
next >
Wrap
C/C++ Source or Header
|
1992-08-01
|
2KB
|
58 lines
/* ------------------------------------------------------------------------ */
/* demo on miscellaneous stuff */
/* ------------------------------------------------------------------------ */
#include <stdio.h>
#include <conio.h>
#include "sstvid.h"
#include "sstwin.h"
#include "sstkey.h"
void main (void);
void kbddemo (void);
/* ------------------------------------------------------------------------ */
/* demo of keyboard functions */
/* ------------------------------------------------------------------------ */
void kbddemo(void)
{
int far *c, ch = 0;
vputs(0,1,LIGHTGREEN,"Keyboard status demonstarion.");
vputs(0,4,7,"Toggle status ----------------------");
vputs(0,5,7,"------------------------------------");
vputs(0,13,7,"Momentary status-------------------");
vputs(0,14,7,"-----------------------------------");
while (ch != ESC) {
vputtime(71,0,WHITE,1);
c = kstate();
vputf(0,7,3,"Scroll-lock - %s",((*c & K_SCROLLLOCKON ) ? " ON" : "OFF"));
vputf(0,8,3,"Num-lock - %s",((*c & K_NUMLOCKON ) ? " ON" : "OFF"));
vputf(0,9,3,"Caps-lock - %s",((*c & K_CAPSLOCKON ) ? " ON" : "OFF"));
vputf(0,10,3,"Insert - %s",((*c & K_INSON ) ? " ON" : "OFF"));
vputf(0,11,3,"Ctrl Num-lock - %s",((*c & K_SUSPENDON) ? " ON" : "OFF"));
vputf(0,16,14,"Left shift - %s",((*c & K_LEFTSHIFTDOWN) ? "DOWN" : " "));
vputf(0,17,14,"Right shift - %s",((*c & K_RIGHTSHIFTDOWN ) ? "DOWN" : " "));
vputf(0,18,14,"Ctrl - %s",((*c & K_CTRLDOWN) ? "DOWN" : " "));
vputf(0,19,14,"Alt - %s",((*c & K_ALTDOWN ) ? "DOWN" : " "));
vputf(0,20,14,"Scroll - %s",((*c & K_SCROLLLOCKDOWN ) ? "DOWN" : " "));
vputf(0,21,14,"Num-lock - %s",((*c & K_NUMLOCKDOWN ) ? "DOWN" : " "));
vputf(0,22,14,"Caps-lock - %s",((*c & K_CAPSLOCKDOWN ) ? "DOWN" : " "));
vputf(0,23,14,"Insert - %s",((*c & K_INSDOWN ) ? "DOWN" : " "));
if (kkeyhit())
ch = kgetch();
}
}
/* ------------------------------------------------------------------------ */
void main(void)
{
clrscr();
vputdate(58,0,WHITE,2);
kbddemo();
}